/**
 * 
 */
package org.log4jconfig.xml.editor;

import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.wst.sse.core.text.IStructuredPartitions;
import org.eclipse.wst.xml.core.text.IXMLPartitions;
import org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML;
import org.log4jconfig.xml.editor.contentassist.DelegatingContentAssistProcessor;

/**
 * @author Xi
 *
 */
public class Log4jXMLStructuredTextViewerConfiguration extends StructuredTextViewerConfigurationXML {

	
	public Log4jXMLStructuredTextViewerConfiguration() {
		super();
	}

	@Override
	public IContentAssistProcessor[] getContentAssistProcessors(
			ISourceViewer sourceViewer, String partitionType) {

		IContentAssistProcessor[] processors;

		if (partitionType == IStructuredPartitions.DEFAULT_PARTITION
				|| partitionType == IXMLPartitions.XML_DEFAULT) {
			processors = new IContentAssistProcessor[] { new DelegatingContentAssistProcessor() };
		}
		else {
		
			processors = super.getContentAssistProcessors(sourceViewer,
					partitionType);
		}
		return processors;
	}

	

	

}
